<?php
/**
 * DBShop 电子商务系统
 *
 * ==========================================================================
 * @link      https://www.dbshop.net/
 * @copyright 北京珑大钜商科技有限公司，并保留所有权利。
 * @license   https://www.dbshop.net/license.html License
 * ==========================================================================
 *
 * @author    静静的风 <baron@loongdom.cn>
 *
 */

namespace Operation\Entity;

use Admin\Entity\BaseEntity;
use Doctrine\ORM\Mapping as ORM;

/**
 * 优惠码规则
 * Class CouponCodeRule
 * @package Operation\Entity
 * @ORM\Entity(repositoryClass="Operation\Repository\CouponCodeRuleRepository")
 * @ORM\Table(name="dbshop_coupon_code_rule")
 */
class CouponCodeRule extends BaseEntity
{
    /**
     * 自增id
     * @ORM\Id()
     * @ORM\Column(name="coupon_code_rule_id", type="integer", length=11)
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $couponCodeRuleId;

    /**
     * 优惠码规则标题
     * @ORM\Column(name="coupon_code_title", type="string", length=150)
     */
    private $couponCodeTitle;

    /**
     * 开始时间
     * @ORM\Column(name="coupon_code_start_time", type="integer", length=10)
     */
    private $couponCodeStartTime = 0;

    /**
     * 结束时间
     * @ORM\Column(name="coupon_code_end_time", type="integer", length=10)
     */
    private $couponCodeEndTime = 0;

    /**
     * 优惠码数量
     * @ORM\Column(name="code_num", type="integer", length=11)
     */
    private $codeNum;

    /**
     * 每人可使用的次数
     * @ORM\Column(name="user_use_num", type="integer", length=4)
     */
    private $userUseNum = 1;

    /**
     * 状态，0 禁用，1 启用
     * @ORM\Column(name="coupon_code_state", type="integer", length=1)
     */
    private $couponCodeState;

    /**
     * 购物金额
     * @ORM\Column(name="shopping_amount", type="integer", length=11)
     */
    private $shoppingAmount = 0;

    /**
     * 优惠金额
     * @ORM\Column(name="shopping_discount", type="integer", length=11)
     */
    private $shoppingDiscount = 0;

    /**
     * 客户组类型，allUser 所有客户，userGroup 客户组
     * @ORM\Column(name="coupon_code_user_type", type="string", length=30)
     */
    private $couponCodeUserType;

    /**
     * 个性化客户组内容
     * @ORM\Column(name="coupon_code_user_group", type="text")
     */
    private $couponCodeUserGroup;

    /**
     * 商品类型，allGoods 所有商品，goodsClass 商品分类，goodsBrand 商品品牌
     * @ORM\Column(name="coupon_code_goods_type", type="string", length=30)
     */
    private $couponCodeGoodsType;

    /**
     * 商品类型的内容，如 商品分类、商品品牌、个别商品
     * @ORM\Column(name="coupon_code_goods_body", type="text")
     */
    private $couponCodeGoodsBody;

    /**
     * 创建时间
     * @ORM\Column(name="coupon_code_rule_add_time", type="integer", length=10)
     */
    private $couponCodeRuleAddTime;

    /**
     * @return mixed
     */
    public function getCouponCodeRuleId()
    {
        return $this->couponCodeRuleId;
    }

    /**
     * @param mixed $couponCodeRuleId
     */
    public function setCouponCodeRuleId($couponCodeRuleId): void
    {
        $this->couponCodeRuleId = $couponCodeRuleId;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeTitle()
    {
        return $this->couponCodeTitle;
    }

    /**
     * @param mixed $couponCodeTitle
     */
    public function setCouponCodeTitle($couponCodeTitle): void
    {
        $this->couponCodeTitle = $couponCodeTitle;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeStartTime()
    {
        return $this->couponCodeStartTime;
    }

    /**
     * @param mixed $couponCodeStartTime
     */
    public function setCouponCodeStartTime($couponCodeStartTime): void
    {
        $this->couponCodeStartTime = $couponCodeStartTime;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeEndTime()
    {
        return $this->couponCodeEndTime;
    }

    /**
     * @param mixed $couponCodeEndTime
     */
    public function setCouponCodeEndTime($couponCodeEndTime): void
    {
        $this->couponCodeEndTime = $couponCodeEndTime;
    }

    /**
     * @return mixed
     */
    public function getCodeNum()
    {
        return $this->codeNum;
    }

    /**
     * @param mixed $codeNum
     */
    public function setCodeNum($codeNum): void
    {
        $this->codeNum = $codeNum;
    }

    /**
     * @return mixed
     */
    public function getUserUseNum()
    {
        return $this->userUseNum;
    }

    /**
     * @param mixed $userUseNum
     */
    public function setUserUseNum($userUseNum): void
    {
        $this->userUseNum = $userUseNum;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeState()
    {
        return $this->couponCodeState;
    }

    /**
     * @param mixed $couponCodeState
     */
    public function setCouponCodeState($couponCodeState): void
    {
        $this->couponCodeState = $couponCodeState;
    }

    /**
     * @return mixed
     */
    public function getShoppingAmount()
    {
        return $this->shoppingAmount;
    }

    /**
     * @param mixed $shoppingAmount
     */
    public function setShoppingAmount($shoppingAmount): void
    {
        $this->shoppingAmount = $shoppingAmount;
    }

    /**
     * @return mixed
     */
    public function getShoppingDiscount()
    {
        return $this->shoppingDiscount;
    }

    /**
     * @param mixed $shoppingDiscount
     */
    public function setShoppingDiscount($shoppingDiscount): void
    {
        $this->shoppingDiscount = $shoppingDiscount;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeUserType()
    {
        return $this->couponCodeUserType;
    }

    /**
     * @param mixed $couponCodeUserType
     */
    public function setCouponCodeUserType($couponCodeUserType): void
    {
        $this->couponCodeUserType = $couponCodeUserType;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeUserGroup()
    {
        return $this->couponCodeUserGroup;
    }

    /**
     * @param mixed $couponCodeUserGroup
     */
    public function setCouponCodeUserGroup($couponCodeUserGroup): void
    {
        $this->couponCodeUserGroup = $couponCodeUserGroup;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeGoodsType()
    {
        return $this->couponCodeGoodsType;
    }

    /**
     * @param mixed $couponCodeGoodsType
     */
    public function setCouponCodeGoodsType($couponCodeGoodsType): void
    {
        $this->couponCodeGoodsType = $couponCodeGoodsType;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeGoodsBody()
    {
        return $this->couponCodeGoodsBody;
    }

    /**
     * @param mixed $couponCodeGoodsBody
     */
    public function setCouponCodeGoodsBody($couponCodeGoodsBody): void
    {
        $this->couponCodeGoodsBody = $couponCodeGoodsBody;
    }

    /**
     * @return mixed
     */
    public function getCouponCodeRuleAddTime()
    {
        return $this->couponCodeRuleAddTime;
    }

    /**
     * @param mixed $couponCodeRuleAddTime
     */
    public function setCouponCodeRuleAddTime($couponCodeRuleAddTime): void
    {
        $this->couponCodeRuleAddTime = $couponCodeRuleAddTime;
    }
}